﻿using System;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Collections.Generic;
using Jok.Domain.Web.Data;

namespace Jok.Domain.Web
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class PackagesService
    {
        JokMainEntities ConfigEntities = new JokMainEntities();

        [OperationContract]
        public List<Package> GetPackages()
        {
            return ConfigEntities.Packages.Where(p => p.IsEnabled == true).ToList();
        }

        [OperationContract]
        public List<string> GetShellParams()
        {
            return new List<string>()
            {
                "Jok.Client.Portal,",
                "Jok.Client.Portal.Views.ShellView"
            };
        }
    }
}
